import 'package:bruno/bruno.dart';
import 'package:flutter/material.dart';

import 'package:get/get.dart';

import '../controllers/about_us_controller.dart';

class AboutUsView extends GetView<AboutUsController> {
  const AboutUsView({super.key});
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: const Color(0xffF1F1F1),
      appBar: BrnAppBar(
        automaticallyImplyLeading: true,
        title: "关于我们",
        backgroundColor: Colors.white,
        showDefaultBottom: false,
        backLeadCallback: () => Get.back(),
      ),
      body: Padding(
        padding: const EdgeInsets.all(16.0),
        child: ListView(
          children: [
            const CircleAvatar(
              radius: 50,
              backgroundImage: AssetImage('assets/images/app_logo.png'), // 替换为你的App Logo路径
            ),
            const SizedBox(height: 16),
            const Text(
              '智能问诊',
              style: TextStyle(fontSize: 24, fontWeight: FontWeight.bold),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 8),
            const Text(
              '版本 1.0.0',
              style: TextStyle(fontSize: 16, color: Colors.grey),
              textAlign: TextAlign.center,
            ),
            const SizedBox(height: 24),
            _buildSection("公司简介", "我们是一家专注于智能医疗服务的科技公司，致力于通过人工智能技术改善医疗体验。"),
            _buildSection("联系方式", "邮箱：support@smartclinic.com\n电话：400-123-4567"),
            _buildSection("服务条款", "使用本应用即表示您接受我们的服务条款和隐私政策。\n了解更多 >"),
            _buildSection("第三方库", "本项目使用了以下开源库：\n- GetX\n- Flutter\n- Dio\n- Cached Network Image"),
          ],
        ),
      ),
    );
  }

  Widget _buildSection(String title, String content) {
    return Column(
      crossAxisAlignment: CrossAxisAlignment.start,
      children: [
        Text(
          title,
          style: const TextStyle(fontSize: 18, fontWeight: FontWeight.bold),
        ),
        const SizedBox(height: 8),
        Text(
          content,
          style: const TextStyle(fontSize: 16, height: 1.5),
        ),
        const Divider(height: 24),
      ],
    );
  }
}